﻿var app = angular.module("App", ['ngRoute']);
app.config(function ($routeProvider, $httpProvider) {
    $httpProvider.interceptors.push("AuthInterceptor")
    $routeProvider.when("/", {
        templateUrl: "/App/Views/index.html",
        controller: "homeController"
    }).when("/product_details/:id", {
        templateUrl: "/App/Views/product_details.html",
        controller: "detailsController"
    }).when("/admin_product_details/:id", {
        templateUrl: "/App/Views/admin/admin_product_details.html",//change this back
        controller: "detailsController"
    }).when("/edit_picture/:id", {
        templateUrl: "/App/Views/admin/edit_picture1.html", //change this back
        controller: "PictureController"
    }).when("/edit_product/:id", {
        templateUrl: "/App/Views/Admin/edit_product1.html",//change this back
        controller: "detailsController"
    }).when("/new_product", {
        templateUrl: "/App/Views/Admin/new_product1.html",//change this back
        controller: "homeController"
    }).when("/admin_index", {
        templateUrl: "/App/Views/Admin/admin_index1.html",//change this back
        controller:"homeController"
    }).when("/contact", {
        templateUrl: "/App/Views/contact.html",
        controller: "EmailController"
    }).when("/shopping_cart", {
        templateUrl: "/App/Views/shopping_cart.html",
        controller:"homeController"
    }).when("/product_list", {
        templateUrl: "/App/Views/product_list.html",
        controller: "AllProductListController"
    }).otherwise({
        templateUrl: "/App/Views/index.html",
        controlller: "homeController"
    })
})